<template>
  <dict-basic-form
    :mode="mode"
    :code="code"
    :titleAdd="'添加报修紧急程度'"
    :titleEdit="'编辑报修紧急程度'"
    :nameLabel="'紧急程度'"
    :showColor="true"
    :api="dictApi"
    :disable-enabled="disableEnabled"
    @success="$emit('success')"
    @close="$emit('close')"
  />
</template>

<script>
import DictBasicForm from '@/views/components/DictBasicForm.vue'
import { getLevel, addLevel, updateLevel } from '@/api/dict/level'

export default {
  name: 'LevelForm',
  components: { DictBasicForm },
  props: {
    mode: { type: String, default: 'create' },
    code: { type: String, default: '' },
    disableEnabled: { type: Boolean, default: false }
  },
  computed: {
    dictApi() {
      return { get: getLevel, add: addLevel, update: updateLevel }
    }
  }
}
</script>

<style scoped>
</style>


